﻿@model Icoders.MarketTracker.Core.MasterData.User

@{
    ViewBag.Title = "Create";
}

<h2>Create a New Account</h2>
<p>
    Use the form below to create a new account. 
</p>


<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
   @Html.ValidationSummary(true)
    <fieldset>
        <legend>User</legend>

        <div class="editor-label">
        <p style="float:right" > </p>
            @Html.Label("User Type")
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.UserTypeId, new SelectList(ViewBag.UserTypeList, "value", "text"), "----------Select User Type-----------")
            @Html.ValidationMessageFor(model => model.UserTypeId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Username)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Username)
            @Html.ValidationMessageFor(model => model.Username)
        </div>

  

        <div class="editor-label">
            @Html.LabelFor(model => model.FirstName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.FirstName)
            @Html.ValidationMessageFor(model => model.FirstName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.LastName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.LastName)
            @Html.ValidationMessageFor(model => model.LastName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.PhoneNumber)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.PhoneNumber)
            @Html.ValidationMessageFor(model => model.PhoneNumber)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Email)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Email)
            @Html.ValidationMessageFor(model => model.Email)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.GroupId)
        </div>
       <div class="editor-field">
            @Html.DropDownListFor(model => model.GroupId, new SelectList(ViewBag.UserGroupList, "value", "text"), "----------Select User Access Group -----------")
            @Html.ValidationMessageFor(model => model.GroupId)
        </div>
        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}
<div>
    @Html.ActionLink("Back to List", "Index")
</div>
